// app.js
import request from './utils/request'
App({
  onLaunch: function() {
    wx.login({
      success:async (res) => {
        const result=await request({
          url:'/user/user/login',
          method:'post',
          data:{
            code:res.code
          }
        })
        // 存储用户信息
        for(const key in result.result){
          
          wx.setStorageSync(key, result.result[key])
        }
      },
    })
  }
})
